﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Mindfor.Web.Data.Mappings
{
	public class PageTextMap : ClassMap<PageText>
	{
		public PageTextMap()
		{
			Table("PageTexts");
			CompositeId()
				.KeyReference(m => m.Page, "PageId")
				.KeyReference(m => m.Language, "LanguageId");
			
			Map(m => m.Title).Length(255).Nullable();
			Map(m => m.MenuTitle).Length(255).Nullable();
			Map(m => m.HeadTitle).Length(255).Nullable();
			Map(m => m.Text).Length(int.MaxValue).Nullable();
			Map(m => m.Description).Length(1023).Nullable();
			Map(m => m.Url).Length(1023).Nullable();
			Map(m => m.EditorType);
		}
	}
}
